package com.example.juyixia;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.RelativeLayout;

public class SetActivity extends Activity implements OnClickListener{
	private ImageView mIv_Back;
	private RelativeLayout re_name;
	private RelativeLayout re_sex;
	private RelativeLayout re_sign;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);  
        setContentView(R.layout.activity_setting);  
        initViews();
	}
	private void initViews() {
		// TODO Auto-generated method stub
		mIv_Back = (ImageView) findViewById(R.id.iv_back);
		re_name = (RelativeLayout) findViewById(R.id.re_name);
		re_sex = (RelativeLayout) findViewById(R.id.re_sex);
		re_sign = (RelativeLayout) findViewById(R.id.re_sign);
		mIv_Back.setOnClickListener(this);
		re_name.setOnClickListener(this);
		re_sex.setOnClickListener(this);
		re_sign.setOnClickListener(this);
	}
	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		switch (v.getId()) {
		case R.id.iv_back:
			finish();
			break;
		case R.id.re_name:
			Intent intent = new Intent(this, UpdateUserNameActivity.class);
			startActivity(intent);
			break;
		case R.id.re_sex:
			Intent intent1 = new Intent(this, UpdateSexActivity.class);
			startActivity(intent1);
			break;
		case R.id.re_sign:
			Intent intent2 = new Intent(this, UpdateSignActivity.class);
			startActivity(intent2);
			break;
		default:
			break;
		}
	}

}
